package com.example.day04.homework;

public class PersonTest {

    public static void main(String[] args) {
        Person person1=new Person("秀贤",25,"男",false);
        Person person2=new Person("Jennie",22,"女",false);


        if(person1.isIsmarry()==false && person2.isIsmarry()==false){
            if(!person1.getSex().equals(person2.getSex())){
                if(person1.getAge()>=24 && person2.getAge()>=22){
                    System.out.println(person1.getName()+"和"+person2.getName()+"可以结婚");
                    return;
                }
            }
        }
            System.out.println(person1.getName()+"和"+person2.getName()+"不可以结婚");

    }
}
